home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_08 / saks / newapply.cpp < prev    next >
Encoding:
Text File  |  1994-06-12  |  356 b   |  18 lines

  1. Listing 7 - new definitions for the apply functions with a second void * 
  2. parameter
  3.  
  4. void genq::apply(void f(void *e, void *a), void *args)
  5.     {
  6.     cell *p;
  7.     for (p = first; p != 0; p = p->next)
  8.         f(p->element, args);
  9.     }
  10.  
  11. ...
  12.  
  13. inline void 
  14. strq::apply(void f(void *e, void *a), void *args)
  15.     {
  16.     gq.apply(f, args);
  17.     }
  18.